<?php
    
    function validFilename($filename)
    {
        return true;//preg_match("/^[a-z_0-9-]+(/[a-z_0-9-]+)*\.[a-z0-9]{3}$/", $filename);
    }
    
    function validPlainText($message)
    {
        return preg_match("/^[a-z_A-Z 0-9-\|\.,;'\"&]*$/", $message);
    }
    
    function validInt($num)
    {
        if (is_int($num)) return true;
        if ((is_numeric($num)) and (preg_match("/^-?[0-9]{1,10}$/", $num))) return true;
        return false;
    }
    
    function validHtmlTag($tag)
    {
        return preg_match("/^[a-z][a-z0-9]*$/", $tag);
    }
    
?>